const path = require('path')

function resolve(dir) {
   return path.join(__dirname, dir)
}
module.exports = {
   publicPath: '/',
   lintOnSave: true,
   chainWebpack: config => {
      config.resolve.alias
         .set('@', resolve('src'))
      const svgRule = config.module.rule('svg')
      svgRule.exclude.add(resolve('src/assets/images/svg'))

      config.module
         .rule('my-svg')
         .test(/\.(svg)(\?.*)?$/)
         .include
         .add(resolve('src/assets/images/svg'))
         .end()
         .use('svg-sprite-loader')
         .loader('svg-sprite-loader')
   },
   productionSourceMap: false
}